List of SDF's in "Where the rivers meet." SPOILERS!

1,0 == 1	special node in corner of town is triggered
1,1 == 1	asked about house in corner town 1 to mayor town 1
1,2 == 1	voices heard at house town 1
1,3 == 2	not used
1,4 == 1	message at START_STATE heard
1,5 == 1	spoken to priestress in temple
1,6 == 1	gotten "search book" quest in town 1 (when 2, quest completed)
1,7 == 1	slept in horrible room
1,8 == 1/0	depends on flag in which room you sleep in lodge in corner town 1
1,9 == 30	paid for advice of Alfrond
1,10 == 1	Flanagan in town 1 advised you to go to Benthol in town 5
1,11 == 1	message about inn heard
1,12 == 1	message about platform with altar heard
1,13 == 1	message about altarhouse inside heard
1,14 == 1	message about altarhouse outside heard
1,15 == 1	message about townhall heard
1,16 == 1	if attack on HQ happened, this flag is 1
1,17 == 1	message after HQ attack heard
1,18 == 1	message about fled shop owner heard
1,19 == 1	message about temple abandoned heard
1,20 == 1	message about crops heard
1,21 == 1	message about clarisse's lodge heard
1,22 == 1	message about new inn full with soldiers heard
1,23 == 1	this flag manipulates INTRO text of Flanagan
1,24 == 1	message about corpse heard

2,1 == 1	message about portal heard
2,2 == 1	message about corridor heard
2,3 == 1	message about throne room heard
2,4 == 1	message about treasure room heard
2,6 == 1	message about laboratory heard
2,10 == 1	message about small temple heard

3,0 == 1	message about store room heard
3,1 == 1	message about store room heard
3,2 == 1	message about second store room heard
3,3 == 1	message "found Thralni" heard
3,4 == 1	you already talked Thralni, special not triggered again
3,5 == 1	message about prison store room heard
3,6 == 1	message about third store room heard
3,7 == 0/1	(doesn't appear to have real function)
3,8 == 1	message about lab heard
3,9 == 1	message about guards gone heard
3,10 == 1	wizard won't appear when dead
3,11 == 1	pack leaders appeared

4,0 == 1	message about reception heard
4,1 == 1	found empire scrolls in town 4
4,2 == 1	message about secret door heard
4,3 == 1	read book

5,0 == 1	quest "kill bandits" gotten (when 2, quest completed)
5,1 == 1	quest "find maker Senarti and kill him" gotten (when 2, quest completed)
5,2 == 1	Empire liaison kidnapped; new dialogue option with mayor Ruth; Town 7 appears
5,3 == 1	quest "find empire liaison" gotten (when 2, quest completed)
5,4 == 1	quest "find stolen scrolls" gotten (when 2, quest completed) (quest cancelled)
5,5 == 1	message about bridge heard
5,6 == 1	new talking option with Benthol
5,7 == 1/2	the spell benthol teaches you (1 = good, 2 = bad)
5,8 == 1	quest "get scepter for Benthol" gotten (when 2, quest completed)
5,9 == 1	not defined yet
5,10 == 1	quest "destroy leading char's of Sen fort" gotten (when 2, quest completed)
5,11 == 1	quest "kill bandits"; disables dialogue node 10
5,12 == 1	Not sure what this is, presumably only to alter some dialogue
5,13 == 1	strings in dialogue "Pete" different
5,14 == 1	chose one of the bag options in dialogue "clothing from the cow" shop
5,15 == 1	you got note from jordan
5,16 == 1	quest "find and destroy senarti origin" gotten; 2 completed
5,17 == 1	when coming back to town 22 mage is there, when 2, mage is deleted from town 22
5,18 == 1	orderd to go once more to Creation halls by Mayor Ruth (if 5,18 == 0, you will not be able to climb stairs in town 29)
5,19 == 1	new talking options with mayor Ruth
5,20 == 1	codes for all "it was the emperor after all" messages by people all around Riverrod
5,21 == 1	message after HQ attack heard
5,22 == 1	whether or not you can ask to let your wares be bagged
5,23 == 1	whether you already tolled benthol that you killed Thralni or not
5,24 == 1	Benthol told you about research
5,25 == 1	You heard that Flanagan is not to be fully trusted
5,26 == 1	this flag is 1 when flag 200,1 has been set to 1
5,27 == 1	message about lodge heard
5,28 == 1	message about emptiness of Voughton after HQ attack heard
5,29 == 1	eliminated one of two outdoor encounters at Senarti fort

6,1 == 1	Bandit leader killed
6,2 == 1	message about sewer entry guardhouse heard
6,3 == 1	message about sewer entry guardhouse heard
6,4 == 1	message about mess heard
6,5 == 1	found Senarti note (2 = read by mayor Ruth)
6,6 == 1	you sanctified the altar

7,0 == 1	Body empire liaison found
7,1 == 1	message about abandond place heard
7,2 == 1	message about trashpit heard
7,3 == 1	message about note in corner of room heard

8,0 == 1	message about gatehouse heard
8,1 == 1	message about courtyard heard
8,2 == 1	message about throne room heard
8,3 == 1	message about laser beams heard
8,4 == 1	message about laser beams 2 heard
8,5 == 0/1	broken lever in demonstration hall
8,6 == 0/1	whether power/energy source is on/off
8,7 == 1	message about potion demonstration room heard
8,8 == 1	book with Empire records read
8,9 == 1	First hint on Thralni read
8,10 == 1	you know spell to open gates at Senarti gates underground

9,0 == 0/1	power on/off
9,1 == 1	message about control room heard
9,2 == 1	message about control room 2 heard
9,3 == 1	panel power source on

10,0 == 1	monsters appeared
10,1 == 1	gates were opened (when you leave town, flag is set back to 0)

11,0 == 1	You read the spell book (and maybe took it if you got the quest "find the spell book" of Flanagan)
11,1 == 1	not assigned
11,3 == 1 not assigned

11,5 == 1	Senarti chief killed
11,6 == 1	Senarti mage killed
11,7 == 1	message about first entry in fort heard
11,8 == 1	message about pub heard

11,10 == 1	you read the note about the button
11,11 == 1	message in START_STATE heard
11,12 == 1	message about rats heard
11,13 == 1	message about commander's room heard
11,14 == 1	message about mages room heard

12,0 == 1	quest "investigate Stracton" gotten (when 2, quest completed); removes/adds dialogue strings
12,2 == 1	message about leaving fort heard
12,3 == 1	you can now enter crystal mines
12,4 == 1	Kellin angry at you (at 1)
12,5 == 1	quest "bring paper to Flanagan" gotten (when 2, quest completed)
12,6 == 2	You saw commander
12,7 == 2	you saw general (when 12,6 and 12,7 = 2 => can leave fort)
12,8 == 1	you returned to your room, want to rest? question
12,9 == 1	you can rest in your room now
12,10 == 1	found note in relation to quest 11
12,11 == 1	its day commander Johnson must be arrested
12,12 == 1	Commander Johnson has been arrested => other dialog
12,13 == 1	message at START_STATE heard
12,14 == 1	message about temple heard
12,15 == 1	message of Johnson in dining hall heard (if 2 Johnson doesn't appear in dining hall anymore)
12,16 == 1	you have been thrown out of the fort after finding the note (12,10 == 1)
12,17 == 1	you are no loner stopped upon entry of Fort Filbert
12,18 == 1	you gave your opinion on kellin's soup
12,19 == 1	ensures the "got empire order" node of Flamington changes

13,0 == 1	you give real scepter to Benthol
13,1 == 1	you give false scepter to benthol
13,2 == 1	you took the scepters

13,5 == 1	quest "Do ceremony" gotten (when 2, quest completed); cursed when leaving crypt (at 1)
13,6 == 1	message about burial heard
13,7 == 1	message about passag paved walkway heard
13,8 == 1	Prayed at altar

13,13 == 1	When you took the scepters, a shade appears upon leaving the hall
13,14 == 1	you were cursed upon leaving the crypt
13,15 == 0/1	whether or not you took the book

13,17 == 1	Demon was summoned when you prayed

14,0 == 1	You did the ritual
14,1 == 1/2/3/4	How many pools and in which order you did it.
14,2 == 1	pool order was right; gate opens (at 0 remains closed)
14,3 == 1	message about corridor heard
14,4 == 1	message about preparation chamber heard
14,5 == 1	message about tomb chamber heard
14,6 == 1	message about colours heard

15,1 == 1	you found the note at the nest
15,2 == 1	message about entering village heard.

16,0 == 9	variable town entry: when entering town 16 end up in 25, after HQ attack
16,1 == 1	message about hill/altar heard
16,2 == 1	message about archives heard
16,3 == 1	message about dining hall heard
16,4 == 1	message about kitchen heard
16,5 == 1	you have permission to look in archives

17,0 == 1	message about nicer rooms and such heard
17,1 == 1	official in dining room is nice to you (2 = angry)
17,2 == 1	gotten quest "find wife" (2 = finished)
17,3 == 1	message about paper in room heard
17,4 == 1	message about head of fort heard
17,5 == 1	official in third room leaves for a while

18,0 == 0/1	depends on what side of town you came from
18,1 == 1	codes for most hqattack related message and such

20,0 == 1	rusten key found
20,1 == 0/1	whether power is on or off
20,2 == 0/1	whether panel A is on or off
20,3 == 0/1	whether power is on or off
20,4 == 0/1	whether panel B is on or off
20,5 == 0/1	whether power is on or off
20,6 == 0/1	whether panel C is on or off
20,7 == 1	cleaning valves are closed (A)
20,8 == 1	explosion occured after 20,7 == 1
20,9 == 0/1	whether started system panel B on or off
20,10 == 1	cleaning valves are closed (B)
20,11 == 1	explosion occured after 20,10 == 1
20,12 == 0/1	whether started system panel C on or off
20,13 == 1	cleaning valves are closed (C)
20,14 == 1	explosion occured after 20,13 == 1
20,15 == 1	message about gates room heard
20,16 == 1	message about hall B room heard
20,17 == 1	power for test lab on
20,18 == 0/1	whether test lab test is off/on
20,19 == 0/1	whether started system panel A on or off

21,0 == 1	message about island heard
21,1 == 1	message about dining hall heard
21,2 == 1	message about graveyard heard
21,3 == 1	message about chief's room heard
21,4 == 1	you opened gates (set back to 0 upon leaving town)

22,0 == 1	message about store room heard
22,1 == 1	message about sleeping room heard
22,2 == 1	message about "discovery explosion 1" heard
22,3 == 1	message about "discovery explosion 2" heard
22,4 == 1	message about "discovery explosion 3" heard
22,5 == 1	gotten manual
22,6 == 0/1	whether power on or off
22,7 == 1	confirmed "full mode" program
22,8 == 0/1	whether cooling reactor is on or off
22,9 == 1	reactor exploded
22,10 == 1	all panels malfunction
22,11 == 1	message about exhaust heard
22,12 == 1	message about bad smell 1 heard 
22,13 == 1	message about bad smell 2 heard
22,14 == 1	message about bad smell 3 heard
22,15 == 1	message about bad smell 4 heard
22,16 == 1	message about purification chamber heard

122,0 == 1	message about more light heard (this is a town 13 flag!)
122,1 == 1	message about tower on hill heard

23,0 == 1	you found (if nephil in party) sword mechanisme
23,1 == 1	message about hidden temple heard
23,2 == 1	message about demons appearing heard
23,3 == 1	message about big temple heard
23,4 == 1	message about meditation chambers heard
23,5 == 1	message about meditation chambers heard
23,6 == 1	message about hallway heard
23,7 == 1	message about book room heard
23,8 == 1	message about entrance temple heard
23,9 == 1	message about altar heard (and monsters appeared)
23,10 == 1	message about secret room heard

24,0 == 1	message about entering house heard
24,1 == 1	message about trapdoor heard
24,2 == 1	message about bedroom heard

25,0 == 1	message about destruction heard
25,1 == 1	message about wife not found but already got that quest
25,2 == 1	message about wife found, but quest not gotten heard
25,3 == 1	message about ghosts (orange) heard
25,4 == 1	message about stairs heard
25,5 == 1	message about sheep heard

26,0 == 1	you can now enter the mine
26,1 == 1	message about finding note heard => can enter town 24
26,2 == 1	talking option canceled
26,3 == 0/1	whether message upon entering mine is displayed or not (1 = you can enter mine)
26,4 == 1	message about slope down heard
26,5 == 1	message about crystal heard

27,0 == 5	variable town entry: when entering town 22 end up in 27, after explosion
27,1 == 1	message about opened room heard => will also enable potion throwing in town 29
27,2 == 1	can't leave town 22 until teleported by mage
27,3 == 1	message about corridor after explosion 4 heard
27,4 == 1	message about brighter lights heard

28,0 == 1	you have appointment with mayor. If 0, not
28,1 == 2	finished mayor's Fort Filbert quest; erases char 6 from fort filbert when 2 and what_day_of_scenario() == day2 + 3
28,2 == 1	if talked once to mayor Arbuckle, this makes you say something different
28,3 == 1	message about temple heard
28,4 == 1	message about inn heard
28,5 == 1	message about school heard
28,6 == 1	message about basar heard
28,7 == 1	quest from Redrick gotten (2 = completed, special item gotten(horn))
28,8 == 1	message at START_STATE heard
28,9 == 1	message after HQ attack heard

29,0 == 1	You found the key
29,1 == 1	SDF for cutscene into lab after Thralni sent you down
29,2 == 1	you found herbs
29,3 == 1	message about rocks heard
29,4 == 1	alien beasts attack you
29,5 == 1	message about corridor blockade heard
29,6 == 1	message about waist room heard
29,7 == 2	if 2, already had cutscene => no cutscene second time you pass (its not 1 because of a mistake)
29,8 == 1	staff used on one machines => destruction
29,9 == 1	message about destroying machines heard
29,10 == 1	staff used on one machines => destruction
29,11 == 1	staff used on one machines => destruction
29,12 == 1	staff used on one machines => destruction
29,13 == 1	message about corridor with barriers heard
29,14 == 1	message about nephil in cell heard
29,15 == 1	whether potion to remove boulder was thrown
29,16 == 1	message about something needed that explodes for boulders heard
29,17 == 1	message in town 31 about gates open/closed not heared again.
29,18 == 1	can throw potion at rocks

30,0 == 1	message about runes heard
30,1 == 1	message about wall heard
30,2 == 1	message (START_STATE) about explosion heard
30,3 == 1	message about digits heard

31,0 == 1	message about seeing glowing gates first time heard
31,1 == 1	you threw the potion and it exploded
31,2 == 1	message about something needed that explodes for gates heard
31,3 == 1	message about extra gates heard
31,4 == 1	message about locked door heard
31,5 == 1	you can pass underground gates (Thralni didn't complete repairs (day 0))
31,6 == 1	you can pass underground gates (Thralni didn't complete repairs (day 1))
31,7 == 1	you can pass underground gates (Thralni did complete repairs (day 2, but power sources off-line))
31,8 == 1	message about gate rebuild heard => if necessary, can now go in through castle gate

32,0 == ?	sets which gates open and which not
32,1 == 0/1	whether control panel has/has no power
32,2 == 1	message about room heard

33,0 == 1	power source is blown up
33,1 == 0/1	whether control panel A has/has no power
33,2 == 0	power on half; 1 is full
33,3 == 1	can now pull levers
33,4 == 1	lever 1 pulled
33,5 == 1	lever 2 pulled
33,6 == 1	message about living quarters heard
33,7 == 1	message about kitchen heard

34,0 == 1	power source is blown up
34,1 == 1	activated control panel and power source
34,2 == 1	power source 1 is kaput
34,3 == 1	power source 2 is kaput
34,4 == 1	can now pull levers
34,5 == 1	lever 1 pulled
34,6 == 1	lever 2 pulled
34,7 == 1	seen working of the machinery
34,8 == 1	message about control chamber heard
34,9 == 1	message about heat in court yard in heard
34,10 == 1	message about room next to big "beam house" heard

35,0 == 1	power source is blown up
35,1 == 1	message about sound machinery heard
35,2 == 1	message about mumbling heard
35,3 == 1	message about looking through windows heard
35,4 == 1	message about where mumbling came from heard
35,5 == 1	message about council heard
35,6 == 1	message about Thralni's chambers heard
35,7 == 1	answered question of statue correctly
35,8 == ?	makes the statue ask different third questions
35,9 == 1	message about strange room with pentagram heard
35,10 == 1	can now pull levers
35,11 == 1	lever 1 pulled
35,12 == 1	lever 2 pulled
35,13 == 1	message about control room heard
35,14 == 1	message about hidden room heard
35,15 == 1	message about finding note heard
35,16 == ?	for order of pressing buttons (BGRP)
35,17 == ?	If pulled in right order (1324) levers will make this flag 
			eventually 4 => able to demolish power plant

36,0 == 1	message about cave in heard
36,1 == 1	message about sulfer heard
36,2 == 1	message about small cave in heard
36,3 == 1	message about stairscase heard
36,4 == 1	message hissing in heard
36,5 == 1	found herbs patch 1
36,6 == 1	found herbs patch 2
36,7 == 1	you threw the potion and it exploded
36,8 == 1	message about "pity you have nothing to blow place up" heard
36,9 == 1	message about staircase 1 heard

37,0 == 1	message about webs heard
37,1 == 1	message about spiderroom heard
37,2 == 1	message when first entering hut heard

38,0 == 1	message about temple heard
38,1 == 1	message about gate heard
38,2 == 1	message about dock heard
38,3 == 1	message about rats heard
38,4 == 1	message about green-tiled room heard
38,5 == 1	message about emerging room heard
38,6 == 1	message about other gate heard
38,7 == 1	message about campfire heard
38,8 == 1	message about climed up stairs heard
38,9 == 1	message about first sight of city heard

39,0 == 1	you found the portal to Thralni's castle
39,1 == 1	message about library heard
39,2 == 1	message about wallcracks heard
39,3 == 1	message about bedroom heard

40,0 == 1	START_STATE message heard
40,1 == 1	message about temple heard
40,2 == 1	message about Senarti attacking heard
40,3 == 1	message about passage behind door heard
40,4 == 1	message about garden heard
40,5 == 1	message about discovery palace heard
40,6 == 1	message about king heard
40,7 == 1	message about blood at wall heard

41,0 == 1	you killed Thralni => other talking options with benthol and eliminated second outdoor encounter at senarti fort
41,1 == 1	message about cavern heard
41,2 == 1	teleported to middle of hall
41,3 == 1	journal read
41,4 == 1	message about room heard

42,0 == 1	message upon entry of fort heard
42,1 == 1	message about corridor heard
42,2 == 1	message about storeroom heard
42,3 == 1	message about rats heard

43,0 == 1	message about waterfalls heard => moved to town 44

44,0 == 1	message about direction to go heard

45,0 == 1	Prevents from showing cutscene twice
45,1 == 1	You looked through Library window
45,2 == 1	Shop 1 is empty
45,3 == 1	Shop 2 is empty
45,4 == 1	prevents START_STATE message from being displayed twice

46,0 == 1	makes sure cutscene isn't played twice

47,0 == 1	makes sure cutscene isn't played twice

48,0 == 1	makes sure story doesn't display twice

49,0 == 1	message about climb upwards heard
49,1 == 1	message about ruined tower heard

100,0 == 1	message about camp heard
100,1 == 1	message about waterfalls/view heard
100,2 == 1	message about passage/crack heard
100,3 == 1	message 1 guards heard
100,4 == 1	message 2 guards heard
100,5 == 1	message 3 guards heard

101,0 == 1	Senarti guarding fort entry defeated
101,1 == 1	Senarti at camp defeated
101,2 == 1	Senarti group 1 patrolling roads defeated
101,3 == 1	Senarti group 1 patrolling roads defeated
101,4 == 1	message about farm heard
101,5 == 1	defeated Senarti at river mushroom patch

102,0 == 1	message about marsh heard
102,1 == 1	message about skeleton near entrance heard
102,2 == 1	outdoor special encounter beaten
102,3 == 1	message about roads heard
102,4 == 1	can enter tunnel to hydras
102,5 == 1	eliminated encounter with hydra's

105,0 == 1	if you sold benthol thralni's ring, this flag is set to 1 THIS SDF BELONGS TO TOWN 5!

110,3 == 1	message 1 guards heard
110,4 == 1	message 2 guards heard
110,5 == 1	message 3 guards heard

111,0 == 1	message about pit heard
111,1 == 1	message about Summertown heard
111,2 == 1	message about farm 1 heard
111,3 == 1	message about farm 2 heard
111,4 == 1	second message about pit heard, after destroying machinery under creation halls
111,5 == 1	defeated Senarti crossroads encounter
111,6 == 1	defeated Thralni at strange stone formation

112,0 == 1	house investigated
112,1 == 1	message about farm heard
112,2 == 1	NOT IN USE
112,3 == 1	message 1 guards heard
112,4 == 1	message 2 guards heard
112,5 == 1	message 3 guards heard

120,0 == 1	codes for state 14 of town 26: 1 activates this state, 0 deactives

122,3 == 1	message 1 guards heard
122,4 == 1	message 2 guards heard
122,5 == 1	message 3 guards heard

121,0 == 1	after attack hq triggered, doesn't trigger again
121,1 == 1	message about secret entrance heard
121,2 == 1	if flag 18,0 has been set = 1
121,3 == 1	if state 15 is triggered, don't let it be triggered again. From now INIT_STATE will take over

141,0 == 250	found mushrooms 1
141,1 == 250	found mushrooms 2
141,2 == 250	found mushrooms 3
141,3 == 1	message about food heard
141,4 == 1	outdoor encounter canceled
141,5 == 1	outdoor encounter canceled
141,6 == 1	outdoor encounter canceled
141,7 == 1	outdoor encounter canceled
141,8 == 1	outdoor encounter canceled
141,9 == 1	message about cavern heard
141,10 == 1	message about city heard
141,11 == 1	message about cavern 2 heard
141,12 == 1	message about castle heard
141,13 == 1	message about gate heard

142,0 == 1	not defined
142,1 == 1	message about river heard
142,2 == 1	message about waterfall sounds heard

200,0 == 1	trap2.txt triggered and (not) disarmed
200,1 == 1	some people flee towns after Empire hq is attacked
200,2 == 1	text "You have appointment today" shown, also enables dialogue for Mayor arbuckele
200,3 == 1	you opened gates to stairs in town 20
200,4 == 1	you opened main entrance gates in town 20
200,5 == 1	makes sure in rivers.txt variable isn't stored under tick1 unless flag is 1

CONTINUATION of the town 20 flags

220,0 == 1	message at START_STATE heard
220,1 == 1	message about first time in creation hall heard
220,2 == 1	message about manual heard

VARIABLE RELATED FLAGS

250,0 == day3	this flag is set according a certain day day3 in town 31
250,1 == tick1	this flag is set according a certain amount of ticks tick1 in town 33 (divided value)
250,2 == day5	this flag is set according to current day day5
250,3 == day4	this flag is set according to day5 - 0/12/24 etc, depending on day5
250,4 == day1	this flag is set according a certain day day1 in town 28
250,5 == day2	this flag is set according a certain day day2 in town 28
250,6 == tick1	this flag is set according a certain amount of ticks tick1 in town 33 (divided, used % value)
250,7 == day6	this flag is set according to a certain day day6 in town 17
250,8 == people	this flag is set according to amount of party members
250,9 == tick1	this flag is set according to anmount of ticks tick1 in town 12
250,10 == tick1	this flag is set according to anmount of ticks tick1 in town 12

250,19 == ?		a flag that makes  certain thing in rivers.txt possible

SPECIAL FLAGS

275,0 == ?	checks times Thralni to be beaten
275,1 == ?	number of last created creature in a town
275,2 == ?	whether dread curse enabled (yes = 1, no = 0)
299,? == ?	flag belonging to terrain scripts
50,0 == ?	amount of gold in bank
275,3 == 1	start scenario dialog for intro text seen and somethinbg has been chosen
275,4 == 1	state 20 town 12 not run a second time
275,5 == x	This flag remember the last town you were in: necessary for town 20 start_state

HIDDEN GROUPS

1 = Senarti in town 11
2 = alien beasts in town 10
3 = Dakrachs's spirit in town 13
4 = demons in town 29
5 = Senarti in town 22
6 = Demons in town 23
7 = golems in trash pits (town 30)
8 = mage in town 3
9 = extra soldiers in towns
10 = Senarti in town 40
11 = mage 2 in town 3
12 = Three guards in Fort Filbert
13 = Guards at town 3, but only activated upon entering the fort from the gate-side
14 = official in Voughton, who appears in Voughton after leaving Riverrod Empire HQ
15 = pack leaders in town 3